import java.util.Scanner;

public class Ex3_17{
	public static void main(String[] args){
		int computer = (int)(Math.random()*3);
		Scanner input = new Scanner(System.in);
		System.out.print("scissor (0), rock (1), paper (2): ");
		int you = input.nextInt();
		String s = "";
		switch (computer)
		{
		case 0:
			s = "scissor";
			break;
		case 1:
			s = "rock";
			break;
		case 2:
			s = "paper";
			break;
		}
		System.out.printf("The computer is %s. ", s);
		switch (you)
		{
		case 0:
			s = "scissor";
			break;
		case 1:
			s = "rock";
			break;
		case 2:
			s = "paper";
			break;
		}
		if (computer == you)
			System.out.printf("You are %s too.", s);
		else
			System.out.printf("You are %s.", s);

		if (you == computer)
			System.out.printf("It is a draw.\n");
		else if (you > computer){
			if (you == 2 && computer == 0)
				System.out.printf("You lost.\n");
			else
				System.out.printf("You won.\n");
		}
		else{
			if (you == 0 && computer == 2)
				System.out.printf("You won.\n");
			else
				System.out.printf("You lost.\n");
		}
	}
}